package com.ddwl.common.feign.wx;

import com.ddwl.schema.vo.base.WxRestVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author Fu Zhaohui
 * @version 1.0.0
 * @date 2021/6/2 17:26
 */
@Api(tags = "微信基础API")
@FeignClient(name = "WxBaseApi", path = "/cgi-bin", url = "https://api.weixin.qq.com")
public interface WxBaseApi {

    @ApiOperation("获取Token")
    @GetMapping("/token")
    WxRestVo token(@RequestParam("appid") String appid, @RequestParam("secret") String secret, @RequestParam("grant_type") String grant_type);

    @ApiOperation("获取Ticket")
    @GetMapping("/ticket/getticket")
    WxRestVo ticket(@RequestParam("access_token") String access_token, @RequestParam("type") String type);
}
